<% '------------------------------------------------------------ ' Page : ' Diseño : ' Programo : ' Fecha : ' Version : ' ' Descripcion : ' Funciones Generales q se utilizan en las páginas del User Manager. ' ' Functions ' ' . MakePageHeader(pLbl, pAdditionalData) ' . PaginateMakeFootTable(pCount, pCantXPag, pIndex, pNavigatorButtonCount) ' . InitPaginate(pPagCount, pPagCantXPag, pNavigatorButtonCount) ' . MakeTblSelection(pOk, pCancel, pAdd, pClose, pCloseWnd) ' . ShowError(pXmlErr, pLbl) ' . ShowPageHeader(pHeader, pImageSrc) ' . ShowPageHeaderFrame(pstrHeader, pimgProp) ' . CnnFncImg16GetByType(pstrCnnFncType) ' . CnnPkgImg16GetByType(pstrCnnFncType) ' '------------------------------------------------------------ Dim bDebug bDebug=False '///////////////////////////////////////////////////////////////////////////////////////////// ' ' IMAGENES para todo el DG ' Dim imgPlus '- Cross, + Dim imgMinus '- Cross, - imgPlus = Application("DGImages") & "Plus.gif" imgMinus = Application("DGImages") & "Minus.gif" '//////////////////////////////////////////////////////////////////////////////////////////////// ' Metodo : MakePageHeader ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 6 de junio del 2001 ' Version : 2001.0.1 ' ' Descripcion : Arma el Encabezado de Pagina '//////////////////////////////////////////////////////////////////////////////////////////////// Function MakePageHeader(pDescription, pAdditionalData) %>
<% End Function %> <% '//////////////////////////////////////////////////////////////////////////////////////////////// ' Metodo : PaginateMakeFootTable ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 6 de Junio del 2001 ' Version : 2001.0.1 ' ' Descripcion : Arma una tabla de Paginado. ' Parametros ' pCount : Cantidad total de registros ' pCantXPag : Cantidad de Registros mostrados por pagina ' pIndex : Indice de donde se esta mostrando el ultimo Registro ' pNavigatorButtonCount : Cantidad de botones definidos en el navegador ' pItemsDesc : Descripcion de los Items (xEj : Count : 15 Users) '//////////////////////////////////////////////////////////////////////////////////////////////// Function PaginateMakeFootTable(pCount, pCantXPag, pIndex, pNavigatorButtonCount, pItemsDesc) Dim dblCantPag Dim dblActualPage Dim i Dim iFor Dim dblPage Dim dblPrevPage Dim dblNextPage Dim dblInitPage Dim dblLastPage Dim strPageNamePaginate '- Language strPageNamePaginate="PaginateArea" '- Calcula la cantidad de paginas, en base al total de Registros '//////////////////////////////////////////////////////////////////////////////////////////////// dblCantPag = Int(pCount/pCantXPag) If Int(pCount/pCantXPag) < (pCount/pCantXPag) Then dblCantPag = dblCantPag + 1 End If If dblCantPag < 1 Then dblCantPag = 1 End If '//////////////////////////////////////////////////////////////////////////////////////////////// '- Calcula la pagina actual, y la Previa y la Anterior '//////////////////////////////////////////////////////////////////////////////////////////////// dblActualPage=0: i = 0: dblPage = 0 do until dblActualPage > 0 '- Páginas dblPage = dblPage + 1 i = i + pCantXPag If pIndex >= i and pIndex < (i + pCantXPag) Then dblPrevPage = (i - pCantXPag - pCantXPag) dblNextPage = (i) dblActualPage = dblPage exit do End If loop '//////////////////////////////////////////////////////////////////////////////////////////////// '- Calcula el nro del boton con el q debe empzar el navigator '//////////////////////////////////////////////////////////////////////////////////////////////// dblInitPage = dblActualPage If (dblInitPage + pNavigatorButtonCount) > dblCantPag Then dblInitPage = (dblCantPag - pNavigatorButtonCount) + 1 If dblInitPage <= 0 Then dblInitPage = 1 End If '//////////////////////////////////////////////////////////////////////////////////////////////// '- Calcula el nro del boton con el q debe empzar el navigator '//////////////////////////////////////////////////////////////////////////////////////////////// dblLastPage = (dblCantPag * pCantXPag) - pCantXPag '//////////////////////////////////////////////////////////////////////////////////////////////// if bDebug = True then Response.Write "Cant X Pag : " & pCantXPag & "
" Response.Write "Cant de Pag : " & dblCantPag & "
" Response.Write "Pag Actual : " & dblActualPage & "
" Response.Write "Previous Pag : " & dblPrevPage & "
" Response.Write "Next Pag : " & dblNextPage & "
" Response.Write "Init Pag : " & dblInitPage & "
" Response.Write "Last Pag : " & dblLastPage & "
" end if %>
  <%call WriteText (sPageName, "LabelPaginateInformation")%>    <%call WriteText (sPageName, "LabelPaginatePage")%>  <%Response.Write(dblActualPage) ' pagina actual%>  <%call WriteText (sPageName, "LabelPaginateOf")%>  <%Response.Write(dblCantPag) ' cantidad de paginas%>     <%call WriteText (sPageName, "LabelPaginateCount")%>    <%=pCount%> <%=pItemsDesc%> <% If dblCantPag > 1 Then %> > > <% '- Arma el navegador con los botones For i = dblInitPage to dblCantPag iFor = iFor + 1 'Contador de los Botones del Navigator '//////////////////////////////////////////////////////////////////////////////////////////////// ' ' Boton del Navigator ' '//////////////////////////////////////////////////////////////////////////////////////////////// %> onclick="PageMove('<%=(i * pCantXPag) - pCantXPag%>')" title="Page <%=I%>"> <% '//////////////////////////////////////////////////////////////////////////////////////////////// '- Valida la cantidad de Botones en el navigator If CLng(iFor) >= CLng(pNavigatorButtonCount) Then exit for next %> > > <% End If%>
<% End Function %> <% '//////////////////////////////////////////////////////////////////////////////////////////////// ' Metodo : InitPaginate ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 6 de Junio del 2001 ' Version : 2001.0.1 ' ' Descripcion : ' Inicia el Paginado en una Pagina. ' ' '//////////////////////////////////////////////////////////////////////////////////////////////// Function InitPaginate(pPagCount, pPagCantXPag, pNavigatorButtonCount) pPagCount=0 '- Por defecto el contador del paginado esta en Cero If Request("PagCount") <> "" Then pPagCount = CLng(Request("PagCount")) '- Contador del Paginado If pPagCount < 0 Then pPagCount = pPagCount + pPagCount End If End If End Function %> <% '//////////////////////////////////////////////////////////////////////////////////////////////// ' Metodo : MakeTblSelection ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 6 de Junio del 2001 ' Version : 2001.0.1 ' ' Descripcion : Arma una tabla de con los botones de seleccion ' Parametros : ' 1. pOK ' 2. pCancel ' 3. pAdd ' 4. pClose '//////////////////////////////////////////////////////////////////////////////////////////////// Function MakeTblSelection(pOk, pCancel, pAdd, pClose, pCloseWnd) Dim sPageNameSelection sPageNameSelection = "SelectionArea" %>
<% WriteText sPageNameSelection, "lblActions" ' Actions %>  <% If pOK = True Then%> " id=cmdOKSel name="cmdOKSel" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdOKTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdOKAccessKey"%>" LANGUAGE=javascript onclick="return cmdOKSel_onclick()"> <% End If %> <% If pAdd = True Then%> " id=cmdAddSel name="cmdAddSel" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdAddTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdAddAccessKey"%>" LANGUAGE=javascript onclick="return cmdAdd_onclick()"> <% End If %> <% If pClose = True Then%> " id=cmdClose name="cmdClose" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdCloseTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdCloseAccessKey"%>" LANGUAGE=javascript onclick="return cmdClose_onclick()"> <% End If %> <% If pCancel = True Then%> " name="cmdCancelSel" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdCancelTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdCancelAccessKey"%>" LANGUAGE=javascript onclick="return cmdCancelSel_onclick()"> <% End If %> <% If pCloseWnd = True Then%> " accesskey="<%WriteText sPageNameSelection, "cmdCloseWndAccessKey"%>"> <%WriteText sPageNameSelection, "cmdCloseWnd"%> <% End If %> <% WriteText sPageNameSelection, "lblChecks" ' Check %>  " id=cmdCheckAll name="cmdCheckAll" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdCheckAllTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdCheckAllAccessKey"%>" LANGUAGE=javascript onclick="return cmdCheckAll_onclick()"> " name="cmdUnCheckAll" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdUnCheckAllTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdUnCheckAllAccessKey"%>" LANGUAGE=javascript onclick="return cmdUnCheckAll_onclick()"> " name="cmdReverseCheckAll" class="SmallButton" title="<%WriteText sPageNameSelection, "cmdReverseCheckAllTitle"%>" accesskey="<%WriteText sPageNameSelection, "cmdReverseCheckAllAccessKey"%>" LANGUAGE=javascript onclick="return cmdReverseCheckAll_onclick()">
<% End Function '///////////////////////////////////////////////////////////////////////////////////////////// ' Author: Bruno Capuano ' Date: 17-Jul-2001 ' LastModified : ' Description : ' Arma la cabecera de la pagina '///////////////////////////////////////////////////////////////////////////////////////////// Sub ShowPageHeader(pHeader, pImageSrc) %>
    <%=pHeader%>  

<% End Sub '///////////////////////////////////////////////////////////////////////////////////////////// '///////////////////////////////////////////////////////////////////////////////////////////// ' Author: Bruno Capuano ' Date: 13-09-2001 ' LastModified : ' Description : ' ' Define los permisos de asignacion para el Connectors Manager ' '///////////////////////////////////////////////////////////////////////////////////////////// Sub RightsGet(pUsrId, pBlnAdd, pBlnDel, pBlnEdit, pBlnQuery) Dim objRights Dim strGroupId Dim strValue Dim strDefaultValue ' group strGroupId="CNM" ' valor por defecto de los rights strDefaultValue = "0" set objRights = Server.CreateObject("ProfRights.Engine") '- ADD strValue = objRights.RightsGetOneValueByUser(pUsrId, strGroupId, "Add",, strDefaultValue) pBlnAdd = CBool(strValue) '- DEL strValue = objRights.RightsGetOneValueByUser(pUsrId, strGroupId, "Del",, strDefaultValue) pBlnDel = CBool(strValue) '- EDIT strValue = objRights.RightsGetOneValueByUser(pUsrId, strGroupId, "Edit",, strDefaultValue) pBlnEdit = CBool(strValue) '- QUERY strValue = objRights.RightsGetOneValueByUser(pUsrId, strGroupId, "Query",, strDefaultValue) pBlnQuery = CBool(strValue) set objRights = nothing if bDebug = true then Response.Write "User Id : " & pUSrID & "
" Response.Write "Add : " & pBlnAdd & "
" Response.Write "Del : " & pBlnDel & "
" Response.Write "Edit : " & pBlnEdit & "
" Response.Write "Query : " & pBlnQuery & "
" end if End Sub '---------------------------------------------------------------------- ' Metodo : ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 28-12-2001 ' Version : 2001.0.1 ' ' Descripcion : ' Retorna la Imagen de la Fnc en tamaño 16, de acuerdo al tipo del mismo. '---------------------------------------------------------------------- Function CnnFncImg16GetByType(pstrCnnFncType) Select case UCase(pstrCnnFncType) case "ASP" ' Active Server Pages CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncAsp16.gif" case "ASPFORM" ' Pectra ASP Forms CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncAspForm16.gif" case "VBASPXFORM", "CSASPXFORM" ' Pectra ASPX Forms CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncAspXForm16.gif" case "EXCELFORM" ' Pectra Excel Forms CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncExcelForm16.gif" case "ROBOT" ' Robot CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncRobot16.gif" case "URL" ' Url CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncUrl16.gif" case "WINEXE" ' Win Exe CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncWinExe16.gif" case "RUMBAAS400" ' RUMBA AS400 CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFnc327016.gif" case "RUMBA3270" ' RUMBA 3270 CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFnc327016.gif" case "RUMBAUNIX" ' RUMBA UNIX CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFnc327016.gif" case "OFFICE" ' Office CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncOffice16.gif" case "PECTRAMOBILE" ' PECTRA Mobile CnnFncImg16GetByType = Application("CnnMngImages") & "CnnFncPectraMobile16.gif" case "WF" ' WF CnnFncImg16GetByType = Application("CnnMngImages") & "workflow.gif" case else CnnFncImg16GetByType = Application("CnnMngImages") & "Fnc16.gif" End Select End Function '---------------------------------------------------------------------- ' Metodo : ' Diseño : Bruno Capuano ' Programo : Bruno Capuano ' Fecha : 28-12-2001 ' Version : 2001.0.1 ' ' Descripcion : ' Retorna la Imagen del Pkg en tamaño 16, de acuerdo al tipo del mismo. '---------------------------------------------------------------------- Function CnnPkgImg16GetByType(pstrCnnPkgType) Select case UCase(pstrCnnPkgType) case "COM" ' COM CnnPkgImg16GetByType = Application("CnnMngImages") & "CnnPkgCom16.gif" case "OLEDB" ' Oledb CnnPkgImg16GetByType = Application("CnnMngImages") & "CnnPkgOledb16.gif" case "PECTRA2000OLEDB" ' Pectra 2000 Oledb CnnPkgImg16GetByType = Application("CnnMngImages") & "CnnPkgPectra2000Oledb16.gif" case "XML" ' Xml CnnPkgImg16GetByType = Application("CnnMngImages") & "CnnPkgXml16.gif" case "TEXT" ' text CnnPkgImg16GetByType = Application("CnnMngImages") & "CnnPkgTxt16.gif" case else CnnPkgImg16GetByType = Application("CnnMngImages") & "Pkg16.gif" End Select End Function '---------------------------------------------------------------------- ' Diseño : Bruno Capuano ' Fecha : 10-06-2002 ' Version : 2001.0.1 ' Descripcion : Arma una cabecera para los pkg y los frames para la edicion '---------------------------------------------------------------------- Sub ShowPageHeaderFrame(pstrHeader, pimgProp) %>
   <%=pstrHeader%>  

<% End Sub %>